projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1962623
)
remote: Minor argument parsing cleanup
author
Colin Walters
<walters@verbum.org>
Sat, 21 Jun 2014 16:11:56 +0000
(12:11 -0400)
committer
Colin Walters
<walters@verbum.org>
Sat, 21 Jun 2014 19:57:43 +0000
(15:57 -0400)
Only access relevant portion of argv after we've verified argc.
https://bugzilla.gnome.org/show_bug.cgi?id=731984
src/ostree/ot-builtin-remote.c
patch
|
blob
|
history
diff --git
a/src/ostree/ot-builtin-remote.c
b/src/ostree/ot-builtin-remote.c
index 75abc5596b3c86d2f73df13953d67a46488c6ecc..3a9c3b74f731b43f8110f5fd713808d6794d3dff 100644
(file)
--- a/
src/ostree/ot-builtin-remote.c
+++ b/
src/ostree/ot-builtin-remote.c
@@
-98,7
+98,7
@@
ostree_builtin_remote (int argc, char **argv, OstreeRepo *repo, GCancellable *ca
if (!strcmp (op, "add"))
{
- const char *url
= argv[3]
;
+ const char *url;
char **iter;
gs_free char *target_name = NULL;
gs_unref_object GFile *target_conf = NULL;
@@
-110,6
+110,8
@@
ostree_builtin_remote (int argc, char **argv, OstreeRepo *repo, GCancellable *ca
goto out;
}
+ url = argv[3];
+
optbuilder = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}"));
if (argc > 4)